#############################################################################
# Makefile for building: ToolsLib
# Generated by qmake (1.07a) (Qt 3.3.4) on: Sat Jul  1 21:42:39 2006
# Project:  ToolsLib.pro
# Template: app
# Command: $(QMAKE) -o Makefile ToolsLib.pro
#############################################################################

####### Compiler, tools and options

CC       = cc
CXX      = g++
LEX      = flex
YACC     = yacc
STATIC_CFLAGS = -static -static-libgcc
STATIC_LFLAGS = $(STATIC_CFLAGS)
STATIC_LIBS = /usr/lib/libstdc++.a /usr/lib/libpthread.a
SHARED_LIBS = -lm -lstdc++ -lpthread
#CFLAGS   = -pipe -Wall -W -O3
CFLAGS   = -pipe -W -g
#CFLAGS   = -pipe -Wall -W -O3 $(STATIC_CFLAGS)
#CXXFLAGS = -pipe -Wall -W -O -pipe -g
#CXXFLAGS = -pipe -W -O2 -g
#CXXFLAGS = -pipe -W -O3 $(STATIC_CFLAGS)
#CXXFLAGS = -pipe -W -O3
#CXXFLAGS = -pipe -W -O3 $(STATIC_CFLAGS)
#CXXFLAGS = -pipe -W -Wall -O3
CXXFLAGS = -pipe -W -O3 -g -Wno-address-of-packed-member -std=c++2a
#CXXFLAGS = -pipe -W -O3 -g -std=c++11
LEXFLAGS = 
YACCFLAGS= -d
INCPATH  = -I. -I.. -I/usr/local/include
# -I/usr/include/c++/4.9
LINK     = g++
#ld
#LFLAGS	 = -lstdc++ -lpthread
LFLAGS	 = -lstdc++ -lpthread -g
#LFLAGS	 = $(STATIC_LFLAGS)
#LFLAGS   =  -Wl,-rpath,/usr/local/lib  -Wl,-rpath,$(QTDIR)/lib -pthread
#LIBS     = -L/usr/local/lib $(SHARED_LIBS)
LIBS     = -L/usr/local/lib $(STATIC_LIBS)
AR       = ar cqs
RANLIB   = 
MOC      = /usr/X11R6/bin/moc
UIC      = /usr/X11R6/bin/uic
QMAKE    = qmake
TAR      = tar -cf
GZIP     = gzip -9f
COPY     = cp -f
COPY_FILE= $(COPY) -a
COPY_DIR = $(COPY) -R
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK  = ln -sf
DEL_DIR  = rmdir
MOVE     = mv -f
CHK_DIR_EXISTS= test -d
MKDIR    = mkdir -p

WWWRoot  = /var/www/maa/data/html
WWWr1	 = $(WWWRoot)/maasoftware.ru
WWWr2	 = $(WWWRoot)/rusroute.ru
WWWr3	 = $(WWWRoot)/download.maasoftware.ru
WWWe1	 = $(WWWRoot)/maasoftware.com
WWWe2	 = $(WWWRoot)/rusroute.com
WWWe3	 = $(WWWRoot)/download.maasoftware.com
WWWglobal = $(WWWRoot)/global/cgi-bin
binroot  = /bin/root

####### Output directory

OBJECTS_DIR = ./

####### Files

#TARGET   = ToolsLib.a

first: all
####### Implicit rules

.SUFFIXES: .c .o .cpp .cc .cxx .C .nasm

.cpp.o:
	echo Compiling $< ...
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.nasm.o:
	echo Compiling $< ...
	nasm -f elf64 -g -F dwarf -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

#all: Makefile $(TARGET)

#$(TARGET):  $(OBJECTS)  
#	$(AR) $(TARGET) $(OBJECTS)
#	ls -l *.a

#	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)

clean:
	-$(DEL_FILE) $(OBJECTS) $(TARGET)
	-$(DEL_FILE) *~ core *.core

#distclean: clean
#	-$(DEL_FILE) $(TARGET) $(TARGET)

rebuild: clean all
